package partFour.homeWork.code.code03;
/**
 * 创建线程池逻辑代码
 */
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


public class ThreadPool {
    public static void main(String[] args) {
        // 创建线程池
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        // 向线程池中提交任务
//        创建线程方式一 继承Thread类
        executorService.execute(new FileCopyThread1());
//        创建线程方式二 实现Rannable()接口
//        executorService.execute(new FileCopyThread2Imp());
//        创建线程方式三 实现Callable()接口
//        executorService.submit(new FileCopyThread3Imp());
        // 关闭线程池
        executorService.shutdown();
    }
}
